<template>
   <view>
        <!-- 使用自定义的搜索组件 -->
        <view class="search-box">
            <my-search @click="gotoSearch"></my-search>
        </view>
        <view>
            <swiper-view></swiper-view>
        </view>
        <view>
            <cart-nav></cart-nav>
        </view>
        <view>
            <floor-list></floor-list>
        </view>
   </view>
</template>

<script>
import MySearch from '../search/mySearch.vue';
import cartNav from '@/pages/home/cartNav.vue'
import swiperView from '@/pages/home/swiperView.vue'
import FloorList from './floorList.vue';
import mixins from '@/mixins/tabber-badge'
   export default {
      components:{cartNav,swiperView,FloorList,MySearch},
      mixins:[mixins],
      data() {
         return {
            
         };
      },
      onLoad() {
        
      },
      methods: {
         gotoSearch() {
            uni.navigateTo({
               url: '/pages/search/search'
            })
         }

      }
   };
</script>

<style scoped lang="scss">
   .search-box {
   // 设置定位效果为“吸顶”
      position: sticky;
      // 吸顶的“位置”
      top: 0;
      // 提高层级，防止被轮播图覆盖
      z-index: 999;
   }

</style>